package com.htd.erp.product;

import java.util.List;

import javax.enterprise.context.ConversationScoped;
import javax.faces.model.DataModel;
import javax.inject.Named;

import com.htd.erp.common.EntityQuery;
import com.htd.erp.model.Color;
import com.htd.erp.web.JpaDataModel;

@Named
@ConversationScoped
public class ColorQuery extends EntityQuery<Color> {

	private static final long serialVersionUID = 8852485805082571717L;

	@Override
	public DataModel<Color> getDataModel() {
		return new JpaDataModel<Color>(Color.class, getEntityManager());
	}

	@Override
	public List<String> buildDataColumns() {
		return buildDataColumns("id", "name");
	}

}
